package com.cosc716.restaurant.commands.Tables;

import com.cosc716.restaurant.commands.Command;
import com.cosc716.restaurant.domain.CustomerGroup;
import com.cosc716.restaurant.domain.Table;
import com.cosc716.restaurant.system.Aggregator;

public class CommandSeatCustomerGroup implements Command {
	
	private CustomerGroup group;
	private Table table;

	public CommandSeatCustomerGroup(CustomerGroup group, Table table) {
		super();
		this.group = group;
		this.table = table;
	}

	@Override
	public Object execute(Aggregator aggregator) {
		Boolean status;
		
		if (table.seatCustomerGroup(group)) {
			status = new Boolean(true);
		}
		else {
			status = new Boolean(false);
		}
		
		return status;
	}

}
